package com.uplooking.pojo;

import java.util.List;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="tblrole")
public class RoleVO {

	@Column(name="rid")
	private String rid;
	@Id
	@Column(name="rname")
	private String rname;
	@Column(name="rnamezh")
	private String rnamezh;
	@OneToMany(fetch=FetchType.EAGER,mappedBy="mrole")
	private List<MenuVO> menuVOs;
	public List<MenuVO> getMenuVOs() {
		return menuVOs;
	}
	public void setMenuVOs(List<MenuVO> menuVOs) {
		this.menuVOs = menuVOs;
	}
	public String getRid() {
		return rid;
	}
	public void setRid(String rid) {
		this.rid = rid;
	}
	public String getRname() {
		return rname;
	}
	public void setRname(String rname) {
		this.rname = rname;
	}
	public String getRnamezh() {
		return rnamezh;
	}
	public void setRnamezh(String rnamezh) {
		this.rnamezh = rnamezh;
	}
	public RoleVO() {
		super();
	}
	public RoleVO(String rname, String rnamezh) {
		super();
		this.rid = UUID.randomUUID().toString();
		this.rname = rname;
		this.rnamezh = rnamezh;
	}
	@Override
	public String toString() {
		return "RoleVO [rid=" + rid + ", rname=" + rname + ", rnamezh=" + rnamezh + "]";
	}
	
}
